body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
    'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-color: #f5f7fa;
}

code {
  font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New', monospace;
}

:root {
  --primary-color: #1890ff;
  --primary-color-dark: #096dd9;
  --primary-gradient: linear-gradient(135deg, #1890ff 0%, #096dd9 100%);
  --success-color: #52c41a;
  --warning-color: #faad14;
  --error-color: #f5222d;
  --heading-color: #222;
  --text-color: #333;
  --light-text: #666;
  --border-radius: 6px;
  --card-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
  --transition-speed: 0.3s;
}

/* 全局过渡效果 */
* {
  transition: all 0.2s ease;
}

/* 布局相关 */
.site-layout-content {
  min-height: 280px;
  padding: 24px;
  background: #fff;
  border-radius: var(--border-radius);
  box-shadow: var(--card-shadow);
}

.layout-with-sidebar {
  min-height: 100vh;
}

/* 导航栏和侧边栏 */
.ant-layout-header {
  background: var(--primary-gradient) !important;
  padding: 0 24px !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  position: relative;
  z-index: 10;
}

.ant-layout-sider {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  z-index: 5;
}

.logo {
  height: 32px;
  margin: 16px;
  background: rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: bold;
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(4px);
}

/* 菜单样式增强 */
.ant-menu-item {
  border-radius: 4px;
  margin: 4px 8px !important;
}

.ant-menu-item:hover {
  background-color: rgba(24, 144, 255, 0.1);
}

.ant-menu-item-selected {
  background: rgba(24, 144, 255, 0.2) !important;
  font-weight: 500;
}

/* 卡片样式增强 */
.ant-card {
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--card-shadow);
  border: none;
  transition: transform var(--transition-speed), box-shadow var(--transition-speed);
}

.ant-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
}

.ant-card-head {
  border-bottom: none;
  padding-bottom: 0;
}

.ant-card-head-title {
  font-weight: 600;
  color: var(--heading-color);
}

/* 按钮样式增强 */
.ant-btn {
  border-radius: 4px;
}

.ant-btn-primary {
  background: var(--primary-gradient);
  border: none;
  box-shadow: 0 2px 6px rgba(24, 144, 255, 0.4);
}

.ant-btn-primary:hover {
  background: linear-gradient(135deg, #40a9ff 0%, #1890ff 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(24, 144, 255, 0.5);
}

/* 统计卡片美化 */
.ant-statistic-title {
  font-size: 14px;
  color: var(--light-text);
}

.ant-statistic-content {
  font-weight: 600;
  color: var(--heading-color);
}

/* 聊天相关样式 */
.chat-list {
  border-right: 1px solid #f0f0f0;
  height: calc(100vh - 64px);
  overflow-y: auto;
  background-color: #fff;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.03);
}

.chat-container {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 64px);
  background-color: #f5f7fa;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  background-image: url('');
  background-repeat: repeat;
}

.chat-input {
  padding: 16px;
  border-top: 1px solid #f0f0f0;
  background: white;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
}

.message {
  max-width: 70%;
  margin-bottom: 16px;
  padding: 12px 16px;
  border-radius: 12px;
  position: relative;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.message-incoming {
  background-color: white;
  align-self: flex-start;
  border-bottom-left-radius: 2px;
}

.message-outgoing {
  background: linear-gradient(135deg, #dcf8c6 0%, #c8efad 100%);
  align-self: flex-end;
  border-bottom-right-radius: 2px;
}

.message-sensitive {
  background: linear-gradient(135deg, #fff1f0 0%, #ffccc7 100%);
  color: #ff4d4f;
  border: 1px solid #ff4d4f;
}

.message-time {
  font-size: 0.7rem;
  color: #8c8c8c;
  text-align: right;
  margin-top: 5px;
}

.qr-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 50px;
  background-color: white;
  border-radius: var(--border-radius);
  box-shadow: var(--card-shadow);
}

.hidden-placeholder {
  background: linear-gradient(135deg, #f0f0f0 0%, #e6e6e6 100%);
  padding: 12px;
  border-radius: 5px;
  color: #8c8c8c;
  font-style: italic;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* 标记含有敏感信息的聊天 */
.chat-has-sensitive {
  background: linear-gradient(to right, #fff7e6 0%, #fff 100%);
  border-left: 3px solid #faad14;
}

/* 预设文件按钮样式 */
.preset-file-button {
  margin-right: 8px;
  margin-bottom: 8px;
  transition: all 0.3s;
}

.preset-file-button:hover {
  transform: scale(1.05);
}

/* CRM信息标签 */
.crm-tags {
  margin-top: 4px;
}

.crm-tag {
  margin-right: 4px;
  border-radius: 4px;
  padding: 2px 6px;
  background: rgba(24, 144, 255, 0.1);
  border: 1px solid rgba(24, 144, 255, 0.2);
}

/* 表格美化 */
.ant-table {
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--card-shadow);
}

.ant-table-thead > tr > th {
  background-color: #f8fafc;
  font-weight: 600;
}

/* 登录页美化 */
.login-container {
  background: linear-gradient(135deg, #1890ff 0%, #096dd9 100%);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
}

.login-card {
  width: 400px;
  padding: 30px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  background: white;
  border-radius: 8px;
  transform: translateY(0);
  transition: all 0.3s ease;
}

.login-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

.login-logo {
  margin-bottom: 24px;
  text-align: center;
}

/* 滚动条美化 */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 10px;
}

::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: #a1a1a1;
}

/* 主头部样式 */
.main-header {
  padding: 0 24px !important; 
  display: flex; 
  align-items: center; 
  justify-content: space-between;
  height: 64px;
}

.header-left {
  display: flex;
  align-items: center;
}

.logo-with-text {
  display: flex;
  align-items: center;
  margin-right: 24px;
}

.header-search {
  flex: 1;
  max-width: 400px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.action-icon {
  cursor: pointer;
  transition: all 0.3s;
  background-color: rgba(255, 255, 255, 0.2) !important;
  width: 40px !important;
  height: 40px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  line-height: 40px !important;
  font-size: 20px !important;
}

.action-icon:hover {
  background-color: rgba(255, 255, 255, 0.3) !important;
  transform: translateY(-2px);
}

.header-actions > div {
  cursor: pointer;
  display: flex;
  align-items: center;
}

.user-dropdown {
  cursor: pointer;
  display: flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 4px;
  transition: all 0.3s;
}

.user-dropdown:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.user-info {
  margin-left: 8px;
}

.main-sider {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.main-menu {
  border-right: none !important;
}

.sider-footer {
  position: absolute;
  bottom: 0;
  width: 100%;
  background: white;
  padding-bottom: 16px;
}

/* Dashboard 样式 */
.dashboard-container {
  position: relative;
}

.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.dashboard-subtitle {
  color: #8c8c8c;
  margin-bottom: 0 !important;
}

.stats-row {
  margin-bottom: 24px;
}

.stats-card {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
}

.stats-card:hover {
  transform: translateY(-5px);
}

.stats-icon {
  color: rgba(0, 0, 0, 0.45);
  margin-right: 8px;
  background-color: rgba(24, 144, 255, 0.1);
  padding: 8px;
  border-radius: 50%;
}

.stats-trend {
  margin-top: 8px;
  font-size: 12px;
  display: flex;
  align-items: center;
}

.stats-indicator {
  display: inline-block;
  margin-right: 8px;
  padding: 2px 6px;
  border-radius: 10px;
  font-weight: 500;
}

.stats-indicator.positive {
  color: #52c41a;
  background-color: rgba(82, 196, 26, 0.1);
}

.stats-indicator.negative {
  color: #f5222d;
  background-color: rgba(245, 34, 45, 0.1);
}

.stats-indicator.neutral {
  color: #1890ff;
  background-color: rgba(24, 144, 255, 0.1);
}

.stats-period {
  color: #8c8c8c;
}

.second-row {
  margin-bottom: 24px;
}

.status-card {
  height: 100%;
}

.metrics-card {
  height: 100%;
}

.active-users {
  display: flex;
  flex-direction: column;
  margin-top: 16px;
}

.active-users-label {
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
}

.active-users-avatars {
  display: flex;
  flex-wrap: wrap;
}

.recent-contacts-card {
  border-radius: 8px;
  overflow: hidden;
}

.contacts-table {
  border-radius: 0;
  box-shadow: none;
}

.unread-row {
  background-color: rgba(24, 144, 255, 0.05);
  font-weight: 500;
} 